import { observable, computed, action } from 'mobx';
import { Promise } from 'drunk-base';
import { getEventList, deleteEvent, search } from './EventHttpResource';
import { IEventModel } from './EventModel';
import { ListModel } from '../../ListModel';

export class EventListModel extends ListModel<IEventModel> {

    deleteItemImpl(id: string) {
        return deleteEvent(id);
    }

    fetchListImpl(page: number, size: number) {
        return getEventList(page, size);
    }

    searchImpl(name: string, startTime: number, endTime: number, page: number, size: number) {
        return search(name, startTime, endTime, page, size);
    }
}